﻿using BCCommon;
using BCCommon.Enums;
using BCDto.Common.PushMessageConfig;
using BCDto.Sim.Admin.Admin;
using System;
using System.Threading.Tasks;

namespace BCService.Common.PushMessage.PushMessageConfig
{
    /// <summary>
    /// 推送消息配置
    /// </summary>
    public interface IPushMessageConfigService
    {
        /// <summary>
        /// 获取推送消息配置列表
        /// </summary>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="ascending">升序排序</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">每页数据条数</param>
        /// <returns></returns>
        PageableList<PushMessageConfigDto> Query(DateTime? start, DateTime? end, bool? ascending, int pageIndex, int pageSize);

        /// <summary>
        /// 获取推送消息配置信息
        /// </summary>
        /// <param name="pushMessageType">推送消息类型</param>
        /// <returns></returns>
        PushMessageConfigDto GetEntity(PushMessageType pushMessageType);

        /// <summary>
        /// 通过id获取配置信息
        /// </summary>
        /// <param name="pushMessageConfigId">消息配置id</param>
        /// <returns></returns>
        Task<PushMessageConfigDto> GetById(int pushMessageConfigId);

        /// <summary>
        /// 添加推送消息配置信息
        /// </summary>
        /// <param name="adminDto">管理员信息</param>
        /// <param name="pushMessageConfigRequestDto">推送配置请求信息</param>
        /// <returns></returns>
        PushMessageConfigDto Add(AdminDto adminDto, PushMessageConfigRequestDto pushMessageConfigRequestDto);

        /// <summary>
        /// 修改推送消息配置信息
        /// </summary>
        /// <param name="adminDto">管理员信息</param>
        /// <param name="pushMessageConfigId">推送消息配置Id</param>
        /// <param name="pushMessageConfigEntity">推送配置请求信息</param>
        /// <returns></returns>
        PushMessageConfigDto Update(AdminDto adminDto, int pushMessageConfigId, PushMessageConfigRequestDto pushMessageConfigEntity);
    }
}